package com.jgsu.farm.mapper;

import com.jgsu.farm.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @program: farm-10-14-2019
 * @description: 管理员数据层
 * @author: Mr.zuo
 * @create: 2019-12-05 16:42
 **/
@Repository
public interface AdminMapper {

    /**
     * 根据phone和password以及role来查询
     * @Param phone: 手机号
     * @Paramp assword：密码
     * @Param role：角色
     * @Return 返回查询到的角色信息
     * */
        @Select("select * from user where phone = #{phone} and password = #{password} and role = #{role}")
        User loginSysUser(@Param("phone") String  phone, @Param("password") String password, @Param("role") Integer role);
}
